﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Data;

namespace hostal
{
    public partial class CancelarHospedajeHabitacion : Form
    {
        DataTable dataTableTemporal = new DataTable();
        string numeroHabitacion;
        string fechaLlegada;

        public CancelarHospedajeHabitacion(string numeroHabitacion)
        {
            InitializeComponent();
            this.numeroHabitacion = numeroHabitacion;
        }

        private void BTCancelar_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void BTAceptar_Click(object sender, EventArgs e)
        {
            try
            {
                HospedajeDataAccess cancelarReserva = new HospedajeDataAccess();
                cancelarReserva.cancelarHospedajeNumeroHabitacion(numeroHabitacion);

                ConsumoDataAccess cancelarConsumo = new ConsumoDataAccess();
                cancelarConsumo.cancelarConsumo(numeroHabitacion);
            }
            catch(Exception exp){}
            this.Close();
        }
    }
}
